package com.ten.jinxiancun.mapper;

import com.ten.jinxiancun.entity.User;

import java.util.List;
import java.util.Map;

/*
 * 用户表操作接口
 * */
public interface userMapper {
    //查
    public List<Map<String,Object>> getAlluser(Map<String,Object> map);

    public Integer userCount();
      //加
      public Integer AddUser(User user);
      //改
       public Integer UpdateUser(Map<String, Object> map);
       //删
       public Integer DelectUser(Integer id);
       //下拉框
      public  List<Map<String, Object>>  UserType(Map<String, Object> map);
    /*
    穿梭框
    * */
    public List<Map<String, Object>> getRoles(Map<String, Object> map);

    public List<Map<String, Object>> getUserRoles(Map<String, Object> map);

    Integer deleteRoles(Integer userId, Integer roleId);

    public Integer addRoles(Map<String, Object> map);
    // 查询用户是否存在，用于判断用户名是否重复
    List<Map<String, Object>> getUserName(Map<String, Object> map);
    // 查询用户是否拥有角色
    List<Map<String, Object>> getRolesUser(Map<String, Object> map);

}
